package cn.kgm.makeGod;

import java.util.HashMap;
import java.util.Map;

/**
 * @Version 1.8
 * @Author: Kappi
 * @Date: 2025-9-11 17:53
 * @Description: cn.kgm.makeGod.Item
 */
public class Item {
    private int id;
    private String name;
    private ItemType type;
    private int value; // 价值
    private String description; // 描述
    private Map<String, Integer> effects; // 效果

    public Item(int id, String name, ItemType type, int value, String description) {
        this.id = id;
        this.name = name;
        this.type = type;
        this.value = value;
        this.description = description;
        this.effects = new HashMap<>();
    }

    public void addEffect(String attribute, int value) {
        effects.put(attribute, value);
    }

    public Map<String, Integer> getEffects() {
        return effects;
    }

    // getter和setter方法
    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public ItemType getType() {
        return type;
    }

    public int getValue() {
        return value;
    }

    public String getDescription() {
        return description;
    }
}

